Fixed issue with memory usage growing