Fix key processing