bug fix in column type cast