bugfix for setCheckState  method

setCheckState did not set the state and did not refresh the view