Bug fixings

Fix bug of not refresh the update.db after updates