Fixed nil error in swap_instance script