Cast data_or_error to int to stop compiler whining