Changed checkbox logic