improve metis compilation