fixing exit