fixed problem in protectLinkedTables()