Fixed exit bug at line 332