fix problem for objects without a constructor property