added in some checks to prevent creating a subsequent session before the present session is created.