Fixed some hasOwnProperty problems
Handle more cases for hasOwnProperty