Fix fields sometimes being the wrong datatype