fixed errors preventing pics from being stored correctly in master db
and discussions being started if the database did not already exist.