Added Andrea's patch to pass the main tests