So, I stole this with one pride and attempted to adapt it so that the flash stops once the screen is unlocked, but the flash continues until I disable the macro. Am I missing something?