mongoose fix for graphs