Fixed error when assigning a value to a non-exsting object