Solved bug in sync between internal data and ui