Fixing exit bug #1