fix type conversion issues
work with DES test