fix handler bug