fix err code