Fixed issues with extra lines