Fixes bug with hiding trailing lines