fixing bugs for resubmission to app store as compatible with ios 6 through 8