Quick and dirty fix for out of memory error.