fixed bug due to changing db datatype