fix bug with objects