Fixed random bug when sending pencil object to server