Fix freeze on Android