fixed some bugs with the checkboxes, but there is still one unsolved