Bug fix for ios 6 and 3.5 device