Fixed error if route pattern is empty.