fix for screen rotation and connection error