fixed duplicate primary key error
fixed erroneous statement which prevented a correct reset of the database
changed cmd arg to set db to '--resetDb'