Some fixes to be able to retrieve global ex-Chai variables correctly