XA patch from 3.0 and 2.4.1