fix custom constraints