Fixed gates, and made sure that the gate column height can't be greater
than max-column-height.