fixed for iOS6.1 and Xcode4.6, added Demo project