Fixed crucial bug, now that this is working