Fixed bug in router