Fixed some stability issues.