Fixed some bugs when sending to pebble