ugly hack for autocontraints