Refactored according changes related to iOS7