Bug with initialization of app