fix context of handlers