Fixed some KeyErrors