Simplify & fix parameters

### Bugfix

- Fixed bug with halt from parameters.
- Simplified code.