fixes for GCC on Ubuntu