Fix bug with primitive generators.