Fix iOS5 crash