added ios6 support