fix exiting when type in error cmd