Fix EE 2.7 compatibility issues