fixed bugs with checkbox