fixed wrong error code