fix keyvalidation