Added get_upper_border_safe() that was missing.