update and fix error