ENH: Reduced the chance of crashes when CLI returns result images