Make sure the button states in the dispenser always reflect reality. Fixes #48