Laptop turning off when lid is closed. Help?

Solution
search power options in your start menu.
change plan settings. (on whatever one you are using)
restore default settings for this plan.