Test and fix of some type API related issues