Fixed dat2gdat bug (with parameters)