fix bug count pictures