small fix for write.table