fix bug in detail page