fixed return bug