Fix screen rotation issues