Fixed bug in toStruct that inadvertently converted double values to int