Render was being called before data was ready