Fix errors in delete_picture()