Yep, got it savagely when I was a kid. That was because I have (well had really) obsessive compulsive disorder. You did the right thing though, keep doing that exact thing whenever it happens. Its called conditioning, youll be fine