fix ci script for exit code