fix bug in `atd`