General logic OK.

It's working as expected now.