Fix bug in detail page