fixing error routing if pathinfo empty but set