Fix #517: Fix checkbox falling out of sync