fixed a typesystem bug