fixed handler registration