Fix test of whether $? is 0