fixed depreciated moment variable positions

I swapped the variables around to fix depreciated warning for moment