make HandlerLocator more robust