a bug has been fixed in the function new_border.