fix issue with automatic redirect on 404 when routing