maybe fix for metadata race condition