adding bug fixes in kud and metal3 script