fix sessionmanagement in Application