Fixed bug when updating controls