fixed event delegation bug after clearing learned nodes