fixed some issues with routing