Fixed a bug that made the app unresponsive

Fixed a bug that made the app unresponsive