Implemented cancel feature.