fixing bugs with the fields length