Testing the changes from Samian to fix the Windows crash bug

Changes tested on a Intel based computer and doesn't crash anymore after issuing a shutdown command.