Fixed graph shrinking bug