Bug fix in object injection