fix warning reg. no return statement in function returning non-void