Reduce 'cancel_common' function