fix stringsAsFactors problem in as.data.frame