Rearrange to fix asynchronousness of the first callback function