in some case the end condition was not correctly detected