1. Fix crash when program is opened in background before running
