Updating the app to check if the screen is NULL before trying to use it.