fixed handler bug