fix 'CALayer position contains NaN' bug.