Fixing a small bug, using Double instead of double to allow null values