bug fix for detail view