fix memory spamming