Fixed error in send function client js