Added player exiting logic