Corrected toggle ref error