Some fixes in TypeProxy