Looks like my code is doing what is intended...