fix possible crash on task abort and work with new getCD return value