Modified OnBeforeMapping