minor fixes for db recreation