fix cancel function with current number update