fix bug , crash when  handle some pictures