changed exit button so it works