Fix issue where load even fires before styles are rendered