move method call outside the conditional
Merge pull request #2453 from tenderlove/refactor

move method call outside the conditional