Control the fan when it's supposed to be, not when the g-codes are received.