added sendPos from server and fixed some bugs