Fixes more math bugs in RGB driver