fix graph constraint