Windows 8 turns off after long time not activity not expected

Hi everyone,
My computer automatically turns off after some time of inactivity. The power is set to it max performance and also modified to max without disabling anything. The Windows Update is not set to automatic to avoid auto-restart. Why is this happening and what can I do to fix this problem?
