fix nasty bug in routes