immediately change the status
move flush inside the callback