Made the DB init script more resilient to a failure half way through
Merge branch 'pr107'