Fixes to tri-state-checkbox