Minor fix

- Using the appropriate method to destroy a repeating function