fixes for pull request to support pre-ios7