Judge strikes down penalties for passing tougher gun laws