When adding handler, pat did not check whether a handler already was registered. Now it updates the handler if it already exists