Fixed cross-platform issues.