fixed bug in custom gate drop handler