Fixed thumbnail generation