fixes #17, fixes #18 merged windows-compat