Fixed bug that caused app to crash after reboot