code cleanup, fix to GP.