netfilter: Bug fix and code cleaning