Fix returned error when the mode is not ok