Fixed NPE during rotation