Merge "To avoid crash IllegalStateException" into main