random constraint fix