removed most deprecation warnings for ios6