fixed ios6 related bugs