fixed gun generator problem by adding break in switch construct