Fix generator

Closes #14