Bug fix so that agents can be added/edited correctly on Works