Adding text to a text box On Text Changed

Hi! I have two text boxes for entering a time. The time needs to be entered like this 16:30:00.
I want to programmatically enter the colon after the first two digits and programmatically enter the colon and two zeros after the second two digits are entered by the user. The logic I cam up with works when testing with the Companion, however, when I build the app and test it, the logic fails. I have attached a screenshot of my block. Can anyone help resolve this? Thank you!

You can do something like this to avoid complications, you don’t need to use a variable, apart from the fact that you are not considering deleting a character.
Although it would be necessary to perform a validation/limitation of the entered digits