fix cross-platform differences