Fixed scaling problem and improved the CCD resolver.