I need help with getting lights to turn off

I need some help with a simple motion program. I have a Smarthings hub, Samsung motion sensor, and Samsung Smart Bulbs in my bathroom. The lights are directly wired in with no switch.
I created a Webcore Piston based off a working Webcore Piston to run the lights. My issue is that the lights come on and never turn off. When I open the light device in Smartthings, it shows that the off command was given but the lights remain on. The lights turn on and off correctly via the app. I have deleted and added the bulbs 2 times and that did not fix the issue. Any advice?

Remove task cancellation policy = Never on line 41 (if) and add it to line 44 (with)

I have a number of other motion sensor pistons running and they work 90% of the time. They do not have the task cancelation policy set to never. Should i change them to never as well?

Not necessary. Only in this instance, it appears you have it in the wrong location. You probably don’t need that command.

Should i get rid of all of the “nevers” and set them to the default? Im trying to figure out when I should changed the task cancellation policy

If they are working then I would not bother.