Thanks for you reply.
It's intermittent. Sometime it never turns off and the flash stays on, but that's very rare. Mostly it happen within a minute or two. Tried three different iphones (5, 6S and 6S pluS) and same thing is happening over and over again.