fix: Race condition and possiblity of only failed gems