Fix 4.0 incompatibility bug