fix sending wrong error number