chef tests and some fixes to chef