Some fixes for older compilers