Fixed thumbnail generation.