clean up of key handling for parent cntx