fixed bug in read/write float