fixing malformed keys for detail view