Added Key stripping

This should solve a problem with internal keys mismatching with incoming keys.