fixed broken type converting