Added check to avoid duplication of churches and registers