Properly fixed bug in extendLineRight