fix data races in controller

Fix #305
Changed the code.

However, I agree that this fake struct (probably other fake structs as well) is far more complicated than we need.