Small fixes.
Fixed OS X compatibility.