Forgot to add the line that erases the array of callbacks after the window closes.