Adding missing return statements