changed snapshot to capture image for compatibility with iOS 7