Apply fixes suggested here: http://root.cern.ch/phpBB3/viewtopic.php?f=10&t=18743