BugFix on checking types