fix bug "Object object has no method 'hasOwnProperty'"