Fixed bug with Static builds and windows
Removed unused variable