Some bug fixes in displaying profiles