solved bug with objects