Fix for multiple instances in case where jQuery selector matches more than one element in DOM.