fix bug in return statement