fix possible incorrect netmask used in adding to the right side