Bug fix and changes to geo fence API