You should NEVER punish your cat no matter what the cause is! This will only make your cat fearful. Punishment also damages the human-animal bond and can often increase anxiety and exacerbate the problem. Do NOT use any deterrents (i.e. water pistol, citrus peel, pepper) either because it will redirect the behaviour to another spot.