fix smoothmax definition and derivs