fix the return bug