fixed bugs and updated to iOS 7.1 SDK