Fixed problem on halt