solving bug in location togglebuttons