router fix and tests