Fixed performance issues for selecting and placing structures