graph models, fixes #320