Fix for clearing objects at borders by changing Bresenham line algorithm