Memory limit fix