This should probably raise a more descriptive error.