fixed a concurrency issue

Signed-off-by: dvorkinista <villain@noironetworks.com>