Fix complexity violation