Fix for Jquery each method definition