Fix test handle assignment