fixed bug in sending