Added casts to cope with non-double dims, datasize fields