return code bug fix