Fixed routing logic errors