backport checkbox fix in toControl