add some fixes, add update source logic