fix empty object bug