Fixed switching checkbox status not being recognized