IImg memory leak fixed