fixed bug with checkbox not wotking properly