Fixed a border sampling issue