Fixed cross platform issues.