Fixes on DocumentClass and GridContainer