fix issues(displaying content--> display whole content depending on the line count >6  && fix some null pointer exception)