Machinist: bug fixes

bug fixes