Looks like some code got accidentally rearranged. Fixing
Merge pull request #878 from brooksryba/develop

Looks like some code got accidentally rearranged. Fixing