tried to add callback but failed
this has some bug fixes for creation of new session