Fixed performance issues