Fixing a bug where `parse` did not always throw an error on invalid input.