some more minor modifications, towards cross-platform code