some fixes for upgrade path
Merge pull request #30 from lnussel/master

some fixes for upgrade path