app.initialize not called correctly