CSS: IndexOutOfRangeException issue. Fixed #1486