FIXING LINE ENDINGS