Fix calculate patterns.