Made some slight changes to gap resizing.