fixed task edit function