Police officer mistakes gun for taser