Compensating for some dodgy code.