Fixed issue that caused an error when app was reset