Fix rule bug