small fix to routing fuction