Fix mercury tests