Code in previous commit was incorrect, no idea why it even compiled for me