Fix error on URLMIddleware