a bit optimized
linux compilation has been fixed