Fix compatibility issue with new moment version