resolves #861 and also a quick patch to fully close #728 without touching the db
tweaking branch for bugs