Fixed bug where double values were not being evaluated correctly