Fix border out of bounds