Fixed some errors in opening the app for the first time.