clean some codes in constraint