fix exit on first null in key map