adding breakLoop
(cherry picked from commit 5eec4e5d22dae5518b585f36e867112aac0606df)