fix a key error