fixed bug in displaying table