Fix shutdown to not try to lock first