Protect against potential multi-threading issues