Fixed a problem with server running out of memory