Fixes getSession() and createSession() refactor errors.