Fix some machine bugs.