Fixed the clearing of the check boxes as well, also fixed another small bug