Wrong string was being read/written