Fixed a bug in detail view