OS freezes on shut down