Fixed a bug that could erase the local DB.