fix adding a handler to a logger