Support cancel and pause