Fixed undefined can't call remove() method

Fixed undefined can't call remove() method when selecting close_others method.
Now it closes the context menu after finishing.