Fixed some stupid read and write issues