avoid_loop Patch by Gerardo Malazdrewicz <gerardo@malazdrewicz.com.ar>