Fix regression relating to reading doubles from memory