Fix broken flags code
Clean up key pair on host rm