Fixed bug in GS function. But need to write a projector operator.