fix erroneous return value