fixing graph collection and bugs