adapt to iOS7
merge