Fixed teh error handling to accept decimal input.