fix a bug in GetControls