Bug fixes to pebble game