fixing datatype behaviour