Fix parser invalid exit bug