#435 Fixed performance problem. We were calling layouts too often, because of some layout refreshing I added.