fixed notrend=False and nodiagn=False