added buggy code to detail view controller