gpu memory fixes