fix minor issue with empty gaps