Added context menu closing handler