Added on document cancel handlers