Getting errors when attempting to draw the rectangles for the image previews/the labels for the image preview