fix type error (re #931)