fixed a missing return statement