fix layout for small devices

fixes #1633