Value generator works, but has bug that causes crash