The moral of the story is that I was really dumb and this fixes it.