fix data races in controller

Fix #305