Removed faulty createSession function