fixed missing return statement issue