subshells might be interfering with error codes