core: Fix uninitialized number of interface listeners

Closes issue #246, reported by cityant