Add updater and fixed some bugs