fix issue using hasOwnProperty and documentation