Fix 952

Tested under Ubuntu 12.04, for fixing #952.