trying to fix assertion failed bug in fragmentImage. Done for tonight.