Updated the header insertion so that it only occurs after the list view has been rendered