minor changes for cross-platform compatibility