found and fixed error in type conversion