Fixed some portability issues.