fixed a bug that caused edit routes to fail