Removed race condition from the fragment.