Fixing bug with layout rotation.