Added fix for OOM