fixed problem with not closing menu due to event handling ajax problem