various compilation fixes