Actually, it's "sometime" in this case, meaning "eventually" or "at some point in time", rather than "occasionally". You're right that it would be "sometimes" if it were an adverb modifying "happens", but it's not. The only grammatical error in my WFE is the comma after "sometime". I'm not sure if it should be there or not.