some fixes and gd analysis.