Remove hopup and barrel, take it apart, and clean it with warm soapy water, then reassemble it.
If there is visible damage on the rubber, change it.
If it has a 1 piece hopup, you will get much more consistency if you glue a rubber spacer between the hopup and the body.