fix for-loops when objects are extented