fix halt on linux