prevented a bug at the left side of the border
prevented a but at the right side of the border