Fixed the bug of restarting app to update widget