Fixed a bug with closing requests