Fixed iOS7 deprecated API usage