Fix a bug of return value