I've got you! we were overwritting the  variable which was used in the while loop already.