modify last few empty lines