Fixing shutdown