fixes #253: fixed broken cortex unpublish