Change code to cross-platform.