Fixed else case in thumbnail generation