Cleaned up version of the windows fix