Fixed a hasOwnProperty bug