some fixes based on Linux testing