fix schema, and prevent duplication version