Fix problems with floats when exporting, fixes issue #286 #280