fixed sending data bug