handling of trailing empty lines in blocks