fixed several bugs at ha cookbooks

Change-Id: I2bb16dcb60a7b51d76a7337ce1be1fe5a6c8aabf