fixing bugs with checkbox layout