Fixed a bug with incorrect processing of some invalid requests