Weirdly, the last code worked locally, but these changes are necessary for it to run on the server. Eh. Fixes #73.