Merge "Fixing NPE and a race condition on initial load"