Fixed some bugs in g++4.4. One left.