You are using "on_mouse_left" to trigger the function - that's the problem.