Fix conditional to be compatible with 2.7.