fixme: wrong $? check