Make sure cancel isn’t undefined