Fixed bugs that lead to instability on other machines