Fixed bug that caused early loops sometimes