Fixed constraint error on detail page