Fix bug with error message in detail view