attempt at fixing in error that's causing us run out of memory