better change handling, working on Mac/Windows build compatibility