fix the bug with the return statement