Changed the cancel option implementation to that from jQuery UI.