bug fix for return