Fixed issues with new sessions/replaced sessions not initializing application correctly