fix exception in ipad.