Fixed a stupid bottleneck in coefficients code