Fixed some device rotation issues