Fixed some threading issues on iOS

Fixed some threading issues in iOS achievement and score codes