Fixed bug regarding reading doubles out of the DB

Added a test to ensure our doubles/numbers are read out correctly.