Add workaround for bash error trap bug