Added code to exit