fix bug with set generation