object assigning bug fix