Add safety check to avoid edge case errors when running alongside some other plugins (updates #11)