fixed routing logic