Changed some logic for instantiation via fetch_object()