fixing bugs, still small bug with checkbox