Fix for mem = 2 GB