fix invalid conversion