Fixed issue with shell needing to be reset upon exiting.