Eliminated potential race condition