Fix top margin and orientation switching focus