implemented application cancelation for #156