Some fixes on types