Fixed rendering issues while rotating