added fix for event delegation. clean up