Made change to routing so it can deal with nulls