Added missing return statements