Merge from cocos2d