Fixes for g++