Update with changes from #579