More reliable CSS section parse

Fixed minor issues in CSS parser