Fixed writing stuff and stuff.