Fix iOS5 compatability