fix missing return statements