attempts to fix memory overusage