Replaced str copying for strdup seems to work in 64 bits ubuntu