fixed some value conversion issues