Bug correction : huge speedup optimization + imagenotfound case