Fixes for #1028, exit codes