Fixed exit errors