bug when cropping the image in save_results function