Fix some bugs with orientation on iPad