Fix issues with concurrent use of nailgun