Fix bugs in iOS in-app purchases