fix a bug of the return value