fixed bug in borderPoint generator