solved duplicating bug