Fix retval check.