Fix wrong value conversion