add border config and fix bug