fixed stupid bug in read/write temp friends