fixed hard fault error due to wrong data type passed in socket sendto()