NoSuchElementException fixed
#SCL-7146 fixed
(cherry picked from commit c5cf9a7)