1. -Fix some crash bug. add some if.
1. -Fix crash bug that when delete building template from proxy will crash.
2. -Add logic to avoid building overlapped.