Fix toggle function call