fixed the gap gen