Fix bug with moment.js