Fix linux's errors

See commit comments for more details