fix loop bag with callback hell