Fix addepub

An import statement is missing and a it has a reference to an non existent `d` object.