Fixing errors in type computing