Fixed some small buffer issues.