Fixed cd preventing the session from ending