fix annoying terrible easy-to-find bug that caused me an hour of pain. cant modify a read only var