Fix bug where setting values to 0 would not work

atof cannot distinguish between a 'fail' input and 0; use strtod
instead.