fix potential issue with empty constraints