Fix some problems with border