fix bug with async loading