fixed routing when using state data