bug fix in section exists code