Tweaked router a little bit, Fix #541