Fixed thumbnail creation.