slight bug in generator