Template generated code - state updaters broken