fixes racing condition server. fixes #198