fix some condition problem for bordershortcut