A few tweaks to Josh's change, and call out small data issue in error message. Tests pass.