Fixed some edgecase errors.

Empty requets, etc.