Fix another bug and an issue on OS X 10.5.8
Merge pull request #497 from peternewman/e1.37-2

Fix another bug and an issue on OS X 10.5.8