Fixed bugs
Fixed some bugs in the border region

More to fix