fixed missing return statement