Fixes related to windows compatibility