fix some bugs with dataclauses