Changed exit codes to give correct error