Made GridBuilder clear its state when it publishes