Inconsistent return value