Fix bug when removing line

I was using the wrong line range