fix to work with g++