fix err declarations