Fixed a bug where the app halts when running on different screen sizes