fixed race condition on observer counter