Fix error types