Fix an imminent crashes on device. However, app may still crash on device when refresh rate is set to really high. Will fix later.