fix bug in displaying screenshot