Fix deleteKeys. Need more fixes