Fixing bugs appering in Windows