Fixed bug with g++