Fix inconsistent returned value