fixed race condition when creating networks and firewalls

counterpart to issue #14