Improved error message in getSection method.