fixed safety loop