fix first and last expandable lines
fix last exandable line