update UI and fix a bug in sprig call