4.0 fixes