Fixes

An issue arose with functions publicity and also as when used in a subdirectory.