Fixes unworking sys keys in Windows and compilation issue