fix bug in afterware