Fixed bug in validation of doubles