Fixed type conversion problem