Using @juliangruber solution for keys.