Updated bug fix from Edgard Pierre <epierre@triumf.ca> at Triumf.