Fixes #311 - exception with leading/trailing decimal point.