Fixes some bugs in deterministic mode 1