Fixed bug around type based lookup