Added fix for Linux + Windows (needs testing on Windows).