properly working on both ios 6 and ios 7 - #1