structure compare finally working fixes #310