Probably want to error out earlier than this with a more helpful error message.