correct netmask calculation

fixes #204