Update 'continue' to 'return' in refactored method.