Some tweaks to keep g++ happy