images now get generated mostly correct