fix checkbox marking issue when using model and update tests