amend an error about usage of code