Object self reference error fixed