Fixed message routing (although needs more tests)