fix compile errors and update tools