you are still using a clock component, you might want to remove it...
also you now created an endless loop, because there is no possibility to stop the taking pictures loop anymore, your logic is: take picture - after picture event: take picture again, etc etc
you might want to add some logic and provide an exit, for example depending on the counter