Fixed #3116 Moved session init to occur after installation