Fixed performance issues with