better fix for the serialisation issue with the optimiser rules