fixed doubling bug