And ? Your question is what? You know what the problem is.(The string coming off the pulley). You know what is causing it (The loose pulley) So get a new part and replace the loose pulley. Presuming it can be removed and replaced. I wouldn't know because like a lot of other people on here you have not said what make & model you are referring too.
Lincoln Appliance NZ, January 2015