Helena man handed deferred sentence for sex offense