Backport bug fix from carp

Introducing the fix from https://github.com/noxrepo/pox/commit/5fc413bd
into betta branch