Fixing the rotation error where screen goes black on rotation