Fix inconsistent return statements