trying to fix odd mem error