Fixed issue with closing app without opening anything