Fixed the definition of ApplyM and applyQ in operator.h/c