Fix a bug in return value