Fix for ios 6