Fixed performance issues.