named key and error message fix