Some compilation fixes