Modified PdImage to make removing images work