fixed bug, if object is not an array or object