It might be getting garbage collected. Weird things happen if you don’t store the handle as a variable.