remove unneded event handlers when in inline