fix status race condition