Fixed ValueError when database gets overwritten
Fixed overwrite error