tpch5: fixed some bugs