Fixed IOS 8 errors