Fixes a couple of bad bugs introduced by previous commit
Duplicate request handling, first changes.