Fixed bug with duplicate img click handler