fixing embedded rules