Fixing check box bug