patch to handle implicit undefined return from a constructor