bug fixes for blank line issues