fix bad writing