How to prevent child tickets from being created in loop